/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package systole.propertiesController;

import java.awt.Font;

/**
 * 
 * @author jmj
 */
public class ReportSettingsProperties extends SystoleProperties {

    private final static String REPORT_SETTINGS_FILE_NAME = "report_settings";
    private final static String REPORT_SETTINGS_PROPERTY = "report.";
    /**
     * file name for left image in report
     */
    public final static String FILE_NAME_LEFT_IMAGE = "left_image.png";
    /**
     * file name for right image in report
     */
    public final static String FILE_NAME_RIGHT_IMAGE = "right_image.png";

    /**
     * 
     */
    public ReportSettingsProperties() {
        super();
    }

    @Override
    protected void loadProperties() {
        this.properties = this.propertiesReader.loadProperties(REPORT_SETTINGS_FILE_NAME);
    }

    @Override
    public void saveProperties() {
        this.propertiesReader.saveProperties(properties,
                REPORT_SETTINGS_FILE_NAME);
    }

    /**
     * @param font
     */
    public void saveTitleFont(Font font) {
        this.saveFont(REPORT_SETTINGS_PROPERTY + "title", font);
    }

    /**
     * @param font
     */
    public void saveIndexFont(Font font) {
        this.saveFont(REPORT_SETTINGS_PROPERTY + "index", font);
    }

    /**
     * @param font
     */
    public void saveIndexValueFont(Font font) {
        this.saveFont(REPORT_SETTINGS_PROPERTY + "index.value", font);
    }

    /**
     * @param font
     */
    public void saveDataFont(Font font) {
        this.saveFont(REPORT_SETTINGS_PROPERTY + "index", font);
    }

    /**
     * @param font
     */
    public void saveDataValueFont(Font font) {
        this.saveFont(REPORT_SETTINGS_PROPERTY + "index.value", font);
    }

    /**
     * @param font
     */
    public void savePlotFont(Font font) {
        this.saveFont(REPORT_SETTINGS_PROPERTY + "plot", font);
    }

    /**
     * @param font
     */
    public void saveBodyTextTitleFont(Font font) {
        this.saveFont(REPORT_SETTINGS_PROPERTY + "text.title", font);
    }

    /**
     * @param font
     */
    public void saveBodyTextFont(Font font) {
        this.saveFont(REPORT_SETTINGS_PROPERTY + "text", font);
    }

    /**
     * @param title
     */
    public void saveTitle(String title) {
        this.properties.put(REPORT_SETTINGS_PROPERTY + "title", title);
    }

    /**
     * @param title
     */
    public void savePlotTitle(String title) {
        this.properties.put(REPORT_SETTINGS_PROPERTY + "plot.title", title);
    }

    /**
     * @return plot title
     */
    public String loadPlotTitle() {
        return this.properties.getProperty(REPORT_SETTINGS_PROPERTY
                + "plot.title", "REGISTRO DE VARIACIÓN DE DIÁMETRO ARTERIAL");
    }

    /**
     * @return title
     */
    public String loadTitle() {
        return this.properties.getProperty(REPORT_SETTINGS_PROPERTY + "title",
                "SERVICIO UNIVERSITARIO DE SALUD");
    }

    /**
     * @return title font
     */
    public Font loadTitleFont() {
        return this.loadFont(REPORT_SETTINGS_PROPERTY + "title");
    }

    /**
     * @return index font
     */
    public Font loadIndexFont() {
        return this.loadFont(REPORT_SETTINGS_PROPERTY + "index");
    }

    /**
     * @return index value font
     */
    public Font loadIndexValueFont() {
        return this.loadFont(REPORT_SETTINGS_PROPERTY + "index.value");
    }

    /**
     * @return data font
     */
    public Font loadDataFont() {
        return this.loadFont(REPORT_SETTINGS_PROPERTY + "index");
    }

    /**
     * @return data value font
     */
    public Font loadDataValueFont() {
        return this.loadFont(REPORT_SETTINGS_PROPERTY + "index.value");
    }

    /**
     * @return plot font
     */
    public Font loadPlotFont() {
        return this.loadFont(REPORT_SETTINGS_PROPERTY + "plot");
    }

    /**
     * @return body title font
     */
    public Font loadBodyTextTitleFont() {
        return this.loadFont(REPORT_SETTINGS_PROPERTY + "text.title");
    }

    /**
     * @return body font
     */
    public Font loadBodyTextFont() {
        return this.loadFont(REPORT_SETTINGS_PROPERTY + "text");
    }

    /**
     * @return if use left image
     */
    public boolean loadUseLeftImage() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY + "leftImage.use");
    }

    /**
     * @return if use right image
     */
    public boolean loadUseRightImage() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY
                + "rightImage.use");
    }

    /**
     * @param value
     */
    public void saveUseLeftImage(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "leftImage.use",
                value);
    }

    /**
     * @param value
     */
    public void saveUseRightImage(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "rightImage.use",
                value);
    }

    /**
     * @param value
     */
    public void saveLeftImageSize(int value) {
        this.saveIntValue(REPORT_SETTINGS_PROPERTY + "leftImage.size", value);

    }

    /**
     * @param value
     */
    public void saveRightImageSize(int value) {
        this.saveIntValue(REPORT_SETTINGS_PROPERTY + "rightImage.size", value);
    }

    /**
     * @return left image size
     */
    public int loadLeftImageSize() {
        return this.loadIntValue(REPORT_SETTINGS_PROPERTY + "leftImage.size");

    }

    /**
     * @return right image size
     */
    public int loadRightImageSize() {
        return this.loadIntValue(REPORT_SETTINGS_PROPERTY + "rightImage.size");
    }

    /**
     * @return if use IAR
     */
    public boolean loadUseIAR() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY + "index.IAR.use");
    }

    /**
     * @param value
     */
    public void saveUseIAR(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "index.IAR.use",
                value);
    }

    /**
     * @return if use AOD
     */
    public boolean loadUseAOD() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY + "index.AOD.use");
    }

    /**
     * @param value
     */
    public void saveUseAOD(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "index.AOD.use",
                value);
    }

    /**
     * @return if use AOS
     */
    public boolean loadUseAOS() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY + "index.AOS.use");
    }

    /**
     * @param value
     */
    public void saveUseAOS(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "index.AOS.use",
                value);
    }

    /**
     * @return if use FC
     */
    public boolean loadUseFC() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY + "index.FC.use");
    }

    /**
     * @param value
     */
    public void saveUseFC(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "index.FC.use", value);
    }

    /**
     * @return if use RS
     */
    public boolean loadUseRS() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY + "index.RS.use");
    }

    /**
     * @param value
     */
    public void saveUseRS(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "index.RS.use", value);
    }

    /**
     * @return if use IMC
     */
    public boolean loadUseIMC() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY + "index.IMC.use");
    }

    /**
     * @param value
     */
    public void saveUseIMC(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "index.IMC.use",
                value);
    }

    /**
     * @return if use weight
     */
    public boolean loadUseWeight() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY
                + "data.weight.use");
    }

    /**
     * @param value
     */
    public void saveUseWeight(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "data.weight.use",
                value);
    }

    /**
     * @return if use height
     */
    public boolean loadUseHeight() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY
                + "data.height.use");
    }

    /**
     * @param value
     */
    public void saveUseHeight(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "data.height.use",
                value);
    }

    /**
     * @return if use smoke
     */
    public boolean loadUseSmoke() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY
                + "data.smoke.use");
    }

    /**
     * @param value
     */
    public void saveUseSmoke(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "data.smoke.use",
                value);
    }

    /**
     * @return if use age
     */
    public boolean loadUseAge() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY + "data.age.use");
    }

    /**
     * @param value
     */
    public void saveUseAge(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "data.age.use", value);
    }

    /**
     * @return if use PS
     */
    public boolean loadUsePS() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY + "data.PS.use");
    }

    /**
     * @param value
     */
    public void saveUsePS(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "data.PS.use", value);
    }

    /**
     * @return if use PD
     */
    public boolean loadUsePD() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY + "data.PD.use");
    }

    /**
     * @param value
     */
    public void saveUsePD(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "data.PD.use", value);
    }

    /**
     * @return if use color for plot
     */
    public boolean loadUseColorOnPlot() {
        return this.loadBooleanValue(REPORT_SETTINGS_PROPERTY + "plot.color.use");
    }

    /**
     * @param value
     */
    public void saveUseColorOnPlot(boolean value) {
        this.saveBooleanValue(REPORT_SETTINGS_PROPERTY + "plot.color.use", value);
    }

    /**
     * @return title plot location
     */
    public int loadPlotTitleLocation() {
        return this.loadIntValue(REPORT_SETTINGS_PROPERTY + "plot.title.location");
    }

    /**
     * @param value
     */
    public void savePlotTitleLocation(int value) {
        this.saveIntValue(REPORT_SETTINGS_PROPERTY + "plot.title.location", value);
    }
}
